package com.dawan.sbjy.Rabbit;

import com.dawan.sbjy.Config.RabbitConfig;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.UUID;
@Component
public class RabbitProducer {
    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send(String email) {
//        String context = "hello " + email;
//        System.out.println("Sender : " + context);
////        this.rabbitTemplate.convertAndSend("hello", context);
        this.rabbitTemplate.convertAndSend("lilechange","1234",email);
    }
}
